﻿using Microsoft.AspNet.SignalR;

namespace WebApp.Hubs
{
    public class MemoryUsageHub : Hub
    {
        public void PhysicalMemoryState()
        {
            Clients.All.updateMessages(System.Diagnostics.Process.GetCurrentProcess().WorkingSet64);
        }

        public void VirtualMemoryState()
        {
            Clients.All.updateVirtualMemoryData(System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64);
        }

        public void InternetConnection()
        {
            Clients.All.checkIntenetConnection(System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable());
        }
    }
}